<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" trimDirectiveWhitespaces="true"%>
<%@ taglib prefix="tiles" uri="http://tiles.apache.org/tags-tiles" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="mehm" uri="/WEB-INF/tld/mehmTagPortlet.tld"%>

<% pageContext.setAttribute("year", new org.joda.time.DateTime().getYear());%>

<tiles:insertTemplate template="/WEB-INF/template/template001.jsp" flush="true" >

<tiles:putAttribute name="title" cascade="true">Portfull</tiles:putAttribute>
<tiles:putAttribute name="keywords" cascade="true">dinheiro, publicidade</tiles:putAttribute>
<tiles:putAttribute name="description" cascade="true">ganhe dinheiro</tiles:putAttribute>

<tiles:putAttribute name="css_extension" cascade="true">

</tiles:putAttribute>
<tiles:putAttribute name="js_extension" cascade="true">
    <script charset="utf-8" type="text/javascript">
    //<![CDATA[
        var param = $.address.parameter("idPortlet");
        // primeira chamada
        $.ajax({
            url: "<c:url value='/rest/portlet/description/' />"+param,
            dataType:"json",
            type:"GET",
            cache: false,
            success: function(data, textStatus, jqXHR){
                console.debug(data);
                viewModel.dados = ko.mapping.fromJS(data);
                ko.applyBindings(viewModel);
                alert(data);
            }
        });

    //]]>
    </script>
</tiles:putAttribute>

<tiles:putAttribute name="content" cascade="true">
    <section>
        <div id="portlet-description" class="portlet-description">

        </div>
        <div class="topo-description">
        <div class="menu-description">
            <img src="<c:url value='/img/like.jpg'/>" title="Gostei"/>
            <img src="<c:url value='/img/dlike.jpg'/>" title="Não Gostei"/>
            <img src="<c:url value='/img/marcar.jpg'/>" title="Marcar"/>
            <img src="<c:url value='/img/link.jpg'/>" title="Link"/>
            <img src="<c:url value='/img/desconto.jpg'/>" title="Desconto"/>
            <img src="<c:url value='/img/rejeitar.jpg'/>" title="Rejeitar"/>
            <img src="<c:url value='/img/denuncia.jpg'/>" title="Denúncia"/>
        </div>
        </div>
        <div class="main-description">
            <div class="company-description">

            </div>
            <!--TODO: Implementar funcionalidade pratica com JavaScript
            <img src="http://chart.apis.google.com/chart?cht=qr&chl=http://localhost<c:url value='/qr/portlet/4723289d-f70d-415c-bad1-34d7ba72c6f7'/>&chs=120x120&chld=H" />
            -->
        </div>
    </section>

</tiles:putAttribute>

</tiles:insertTemplate>
